
<div id="main" >
<div id="contents" style="height: 400px;">
<form name="filters" action="#" method="post" >
<fieldset>
<legend>&#160;<label sid="usbprint.form"></label>&#160;</legend>
<div class="frame_tab_layer">
    <table width="100%" border="0" cellpadding="0" cellspacing="0" class="cmenutitle" >
           <tbody id="listInfo">

           </tbody>
    </table>
</div>
</fieldset>
</form>
</div>
</div>
<br/>
<div id="helpContainer">
    <div id="help">
        <div><h2><img src="images/help_title.png" border="0"/><label sid="share.help"></label></h2></div>
        <div id="helpBody">
            <dl>

                <dd class="definition"><label sid="usbprint.help1"></label><br/><br/>
                <dt class="term"><label sid="usbprint.help2"></label></dt>
                <dd class="definition">
                    <label sid="usbprint.step1"></label><br/> <br/>
                    <label sid="usbprint.step2"></label>
                </dd>

            </dl>
        </div>
    </div>
</div>
<script type="text/javascript">
    getPrintStatus();
        obj  = setInterval(function(){
            if(typeof($("#listInfo").html())=="undefined"){
                clearInterval(obj);
            }
            getPrintStatus()
        }, 5000);

         function getPrintStatus(){

             var url ='status?get&param=WROC_printerInfo';
             $.ajax({
                 type:"get",
                 url :url,
                 dataType:"json",
                 timeout:5000,
                 success:function(data){
                     var listInfo = data["printerInfo"];
                     var listInfo_arr = listInfo.split(";");
                     var listInfo_length = listInfo_arr.length;
                     var arr = [];
                     arr.push('<tr>');
                     arr.push('<th>'+usbprint.Manufacturer+'</th>');
                     arr.push('<th>'+usbprint.Product+'</th>');
                     arr.push('<th>'+usbprint.SerialNumber+'</th>');
                     arr.push('<th>'+usbprint.linkStatus+'</th>');
                     arr.push('</tr>');
                     for(var i=0;i<listInfo_length-1;i++){
                         arr.push('<tr>');
                         arr.push('<td>'+listInfo_arr[i].split(",")[0]+'</td>');
                         arr.push('<td>'+listInfo_arr[i].split(",")[1]+'</td>');
                         arr.push('<td>'+listInfo_arr[i].split(",")[2]+'</td>');
                         arr.push('<td>'+usbprint.Status+'</td>');
                         arr.push('</tr>');
                     }
                     $("#listInfo").html(arr.join(""));
                 }
             });
         }



</script>


